﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _inherit
{
    class person
    {
        string name;
        int age;
        string address;

        public person(string name="无名", int age=18, string address="中国")
        {
            Name = name;
            Age = age;
            Address = address;
        }
         ~person()
        {
            Console.WriteLine("我是析构函数");
        }

        public string Name { get => name; set => name = value; }
        public int Age { get => age; set => age = value; }
        public string Address { get => address; set => address = value; }



        public void survive()
        {
            Console.WriteLine("吃喝拉撒睡");
        }
    }
}
